const express = require('express');
const ejs = require('ejs');
const data = require('./data/lol.json');

let app = express();

app.set('views',__dirname+'/html');
app.engine('html',ejs.renderFile);

app.get('/',(req,res)=>{
   let {heros} = data
   res.render('index.html',{heros})
})

app.listen(80,()=>{
    console.log('启动成功');
})